package com.xueyi.aixihu.reqeust;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author lvyi
 * @date : 2022/8/16
 * @Description : 后台用户添加时的request类
 */
@Data
public class DtUsersAddReq {

    private Integer id;

    @NotBlank(message = "用户名不可为空")
    private String username;

    @NotBlank(message = "密码不可为空")
    private String password;

    @NotBlank(message = "头像不可为空")
    private String avatar;

    private String email;

    @NotBlank(message = "手机号不可为空")
    private String phone;

    private String lastLoginIp;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastLoginTimeNew;

    private Integer isValid;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    private String wxOpenId;

    @NotNull(message = "用户类型不可为空")
    private Integer userType;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date expireTime;

    @NotBlank(message = "角色不可为空")
    private String roleId;

    @NotBlank(message = "管理地址不可为空")
    private String manageAreaId;
}
